import { createApp } from "vue";
import App from "./App.vue";
import "./main.less";
import 'virtual:uno.css'
import router, { setupRouter } from "./router";
import {
  setupAntd,
  setupDirectives,
  setupGlobalMethods,
  setupCustomComponents,
} from "@/plugins";
import { setupStore } from "@/store";
import Particles from "vue3-particles";
if (process.env.NODE_ENV === "development") {
  const app: any = createApp(App);

  app.use(Particles);
  // 注册全局常用的ant-design-vue组件
  setupAntd(app);
  // 注册全局自定义组件
  setupCustomComponents(app);
  // 注册全局自定义指令
  setupDirectives(app);
  // 注册全局方法
  setupGlobalMethods(app);
  // 挂载状态管理
  setupStore(app);
  // 挂载路由
  setupRouter(app);
  // 路由准备就绪后挂载APP实例
  router.isReady().then(() => app.mount("#app"));
}
